﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;

namespace QntPlatform {
   public class MyClass
    {
        public class data:List<object>
        {
            public int sysNum;
            public int id;
         
        }
        public List<data> Read() {
            dataBase = new List<data>();
            DataList = dataBase;
            
            return null;
        }
        public IReadOnlyList<data> DataList;
        List<data> dataBase = new List<data>();
        int nowNum = 0;
        public int Insert(params data[] ds) {
            
            //append new
            dataBase.AddRange(ds);
            return Append(ds);
        }
        public int Delete(int id) {
            //append  num,id,state
            var obj=dataBase.FirstOrDefault(p => p.id == id);
            dataBase.Remove(obj);
            var data = new data();
            data.id = id;
            data.sysNum = ++nowNum;
            return Append( data);
        }
        public int Update(data data) {
            //更新内存
            //append num,id,new
           
            return 0;
        }

        internal int Write(params data[] datas) {
            
            return 0;
        }
        internal int Append(params data[] datas )
        {

            return 0;
        }
        internal int ClearData() {
            return 0;
        }
    }
}